import request from '@/utils/request'

// 创建演练记录
export function createEmergencyReservePlainDrillRecord(data) {
  return request({
    url: '/biz/emergency-reserve-plain-drill-record/create',
    method: 'post',
    data: data
  })
}

// 更新演练记录
export function updateEmergencyReservePlainDrillRecord(data) {
  return request({
    url: '/biz/emergency-reserve-plain-drill-record/update',
    method: 'put',
    data: data
  })
}

// 删除演练记录
export function deleteEmergencyReservePlainDrillRecord(id) {
  return request({
    url: '/biz/emergency-reserve-plain-drill-record/delete?id=' + id,
    method: 'delete'
  })
}

// 获得演练记录
export function getEmergencyReservePlainDrillRecord(id) {
  return request({
    url: '/biz/emergency-reserve-plain-drill-record/get?id=' + id,
    method: 'get'
  })
}

// 获得演练记录分页
export function getEmergencyReservePlainDrillRecordPage(query) {
  return request({
    url: '/biz/emergency-reserve-plain-drill-record/page',
    method: 'get',
    params: query
  })
}

// 导出演练记录 Excel
export function exportEmergencyReservePlainDrillRecordExcel(query) {
  return request({
    url: '/biz/emergency-reserve-plain-drill-record/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
